<%--
  Created by IntelliJ IDEA.
  User: 殇
  Date: 2021/1/20
  Time: 11:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        入库管理
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="css/main.css" media="all">
    <link rel="stylesheet" href="css/bootstrap.css">
    <script type="text/javascript" src="lib/loading/okLoading.js"></script>
    <style>
        .layui-input{
            width: 200px;
        }

    </style>
</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
              <a><cite>首页</cite></a>
              <a><cite>服务管理</cite></a>
              <a><cite>信箱列表</cite></a>
            </span>

</div>
<div class="x-body" style=";position: absolute;top: 40%;left: 40%;">
    <div class="layui-input-inline" style="width:150px">
        商品编码<font color="red">*</font>
    </div>
    <div class="layui-input-inline" >
        <input type="text" name="username"  placeholder="请输入商品编码" autocomplete="off" class="layui-input" />
    </div>

    <br />
    <br />
    <div class="layui-input-inline" style="width:150px">
        货位编码<font color="red">*</font>
    </div>
    <div class="layui-input-inline" >
        <input type="text" name="username"  placeholder="请输入货位编码" autocomplete="off" class="layui-input" />
    </div>
    <br />
    <br />
    <div class="layui-input-inline" style="width:150px">
        原货位编码<font color="red">*</font>
    </div>
    <div class="layui-input-inline" >
        <input type="text" name="username"  placeholder="请输入源货位编码" autocomplete="off" class="layui-input" />
    </div>
    <br/>
    <br/>
    <div class="layui-input-inline" style="width:150px">
        数量<font color="red">*</font>
    </div>
    <div class="layui-input-inline" >
        <input type="text" name="username"  placeholder="请输入数量" autocomplete="off" class="layui-input" />
    </div>
    <br/>
    <br/>

    &emsp;&emsp;&emsp;&emsp;
    <button class="layui-btn" onclick="mailbox_add('添加','mailboxadd.html','1000','600')">
        <i class="layui-icon">&#xe608;</i>移库
    </button>
    <button class="layui-btn layui-btn-danger" onclick="delAll()">
        <i class="layui-icon">&#xe640;</i>重置
    </button>




    <div id="page"></div>
</div>
<script src="lib/layui/layui.js" charset="utf-8"></script>
<script src="js/x-layui.js" charset="utf-8"></script>
<script>
    layui.use(['laydate','element','laypage','layer'], function(){
        $ = layui.jquery;//jquery
        laydate = layui.laydate;//日期插件
        lement = layui.element();//面包导航
        laypage = layui.laypage;//分页
        layer = layui.layer;//弹出层
        okLoading.close($);
        //以上模块根据需要引入


        var start = {
            min: laydate.now()
            ,max: '2099-06-16 23:59:59'
            ,istoday: false
            ,choose: function(datas){
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };

        var end = {
            min: laydate.now()
            ,max: '2099-06-16 23:59:59'
            ,istoday: false
            ,choose: function(datas){
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };

        document.getElementById('LAY_demorange_s').onclick = function(){
            start.elem = this;
            laydate(start);
        }
        document.getElementById('LAY_demorange_e').onclick = function(){
            end.elem = this
            laydate(end);
        }
    });

    //批量删除提交
    function delAll () {
        layer.confirm('确认要删除吗？',function(index){
            //捉到所有被选中的，发异步进行删除
            layer.msg('删除成功', {icon: 1});
        });
    }

    function question_show (argument) {
        layer.msg('可以跳到前台具体问题页面',{icon:1,time:1000});
    }
    /*添加*/
    function mailbox_add(title,url,w,h){
        x_admin_show(title,url,w,h);
    }
    //编辑
    function mailbox_edit (title,url,id,w,h) {
        url =url+"?id="+id;
        x_admin_show(title,url,w,h);
    }

    /*删除*/
    function mailbox_del(obj,id){
        layer.confirm('确认要删除吗？',{icon:3,title:'提示信息'},function(index){
            $.ajax({
                type:"post",
                url:"xxx",
                data:{id:id},
                dataType:"json",
                success:function(data){
                    //console.log(data);
                    if(data.status==1){
                        //发异步删除数据
                        $(obj).parents("tr").remove();
                        layer.msg(data.info,{icon:6,time:1000});
                        setTimeout(function(){
                            window.location.reload();
                        },1000);return false;
                    } else{
                        layer.msg(data.info,{icon:5,time:1000});return false;
                    }
                }
            });
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }
</script>

</body>
</html>
